/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package boundless.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author hendrikdekock
 */
@Embeddable
public class InvitebyemailPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "SENDERID")
    private int senderid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LEAGUE")
    private int league;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "INVITEEMAIL")
    private String inviteemail;

    public InvitebyemailPK() {
    }

    public InvitebyemailPK(int senderid, int league, String inviteemail) {
        this.senderid = senderid;
        this.league = league;
        this.inviteemail = inviteemail;
    }

    public int getSenderid() {
        return senderid;
    }

    public void setSenderid(int senderid) {
        this.senderid = senderid;
    }

    public int getLeague() {
        return league;
    }

    public void setLeague(int league) {
        this.league = league;
    }

    public String getInviteemail() {
        return inviteemail;
    }

    public void setInviteemail(String inviteemail) {
        this.inviteemail = inviteemail;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) senderid;
        hash += (int) league;
        hash += (inviteemail != null ? inviteemail.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InvitebyemailPK)) {
            return false;
        }
        InvitebyemailPK other = (InvitebyemailPK) object;
        if (this.senderid != other.senderid) {
            return false;
        }
        if (this.league != other.league) {
            return false;
        }
        if ((this.inviteemail == null && other.inviteemail != null) || (this.inviteemail != null && !this.inviteemail.equals(other.inviteemail))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "boundless.entities.InvitebyemailPK[ senderid=" + senderid + ", league=" + league + ", inviteemail=" + inviteemail + " ]";
    }
    
}
